package org.darkforest.model;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.darkforest.common.util.DateUtil;
import org.darkforest.common.util.Page;

public class Activity extends Page<Activity> {
    private Integer activityId;

    private String activityTitle;

    private String activityType;

    private String activityBanner;

    private String activityStyle;

    private String activityDesc;

    private Integer activityStartDate;

    private Integer activityEndDate;

    private Integer activitySort;

    private Boolean activityState;

    private Integer joinMemberCount;

    private String activityStartDateStr;

    private String activityEndDateStr;

    private String activityStartDateTimeStr;

    private String activityEndDateTimeStr;

    private Integer currentTime; //当前时间

    private List<ActivityGift> giftList;

    public Integer getActivityId() {
        return activityId;
    }
    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    public String getActivityTitle() {
        return activityTitle;
    }
    public void setActivityTitle(String activityTitle) {
        this.activityTitle = activityTitle == null ? null : activityTitle.trim();
    }

    public String getActivityType() {
        return activityType;
    }
    public void setActivityType(String activityType) {
        this.activityType = activityType == null ? null : activityType.trim();
    }

    public String getActivityBanner() {
        return activityBanner;
    }
    public void setActivityBanner(String activityBanner) {
        this.activityBanner = activityBanner == null ? null : activityBanner.trim();
    }

    public String getActivityStyle() {
        return activityStyle;
    }
    public void setActivityStyle(String activityStyle) {
        this.activityStyle = activityStyle == null ? null : activityStyle.trim();
    }

    public String getActivityDesc() {
        return activityDesc;
    }
    public void setActivityDesc(String activityDesc) {
        this.activityDesc = activityDesc == null ? null : activityDesc.trim();
    }

    public Integer getActivityStartDate() {
        if (this.activityStartDate == null && StringUtils.isNotEmpty(this.activityStartDateStr)) {
            return DateUtil.toUnixTimeStampByDate(this.activityStartDateStr);
        }
        return activityStartDate;
    }
    public void setActivityStartDate(Integer activityStartDate) {
        this.activityStartDate = activityStartDate;
    }

    public Integer getActivityEndDate() {
        if (this.activityEndDate == null && StringUtils.isNotEmpty(this.activityEndDateStr)) {
            return DateUtil.toUnixTimeStampByDate(this.activityEndDateStr);
        }
        return activityEndDate;
    }
    public void setActivityEndDate(Integer activityEndDate) {
        this.activityEndDate = activityEndDate;
    }

    public Integer getActivitySort() {
        return activitySort;
    }
    public void setActivitySort(Integer activitySort) {
        this.activitySort = activitySort;
    }

    public Boolean getActivityState() {
        return activityState;
    }
    public void setActivityState(Boolean activityState) {
        this.activityState = activityState;
    }

    public Integer getJoinMemberCount() {
        return joinMemberCount;
    }
    public void setJoinMemberCount(Integer joinMemberCount) {
        this.joinMemberCount = joinMemberCount;
    }

    public String getActivityStartDateStr() {
        return activityStartDateStr;
    }
    public void setActivityStartDateStr(String activityStartDateStr) {
        this.activityStartDateStr = activityStartDateStr;
    }

    public String getActivityEndDateStr() {
        return activityEndDateStr;
    }
    public void setActivityEndDateStr(String activityEndDateStr) {
        this.activityEndDateStr = activityEndDateStr;
    }

    public String getActivityStartDateTimeStr() {
        return activityStartDateTimeStr;
    }
    public void setActivityStartDateTimeStr(String activityStartDateTimeStr) {
        this.activityStartDateTimeStr = activityStartDateTimeStr;
    }

    public String getActivityEndDateTimeStr() {
        return activityEndDateTimeStr;
    }
    public void setActivityEndDateTimeStr(String activityEndDateTimeStr) {
        this.activityEndDateTimeStr = activityEndDateTimeStr;
    }

    public Integer getCurrentTime() {
        return currentTime;
    }
    public void setCurrentTime(Integer currentTime) {
        this.currentTime = currentTime;
    }

    public List<ActivityGift> getGiftList() {
        return giftList;
    }
    public void setGiftList(List<ActivityGift> giftList) {
        this.giftList = giftList;
    }
}